// 认证路由
use axum::{
    routing::{get, post},
    Router,
};

// 认证相关路由
// 在路由定义中注入服务
pub fn routes() -> Router {
    Router::new()
        .route("/login", post(login))   // 实际路径: /api/v1/auth/login
        .route("/register", post(auth_service::auth::register))   // /api/v1/auth/register
        .route("/logout", post(super::auth_service::auth::logout))  
        .route("/refresh", post(super::auth_service::auth::refresh))
        .route("/remember-me", get(super::auth_service::auth::remember_me))
        .route("/change-password", post(super::auth_service::auth::change_password))
        .route("/forgot-password", post(super::auth_service::auth::forgot_password))
        .route("/reset-password", post(super::auth_service::auth::reset_password))
        .route("/verify-email", post(super::auth_service::auth::verify_email))
        .route("/resend-verification-email", post(super::auth_service::auth::resend_verification_email))
        .route("/social-login", post(super::auth_service::auth::social_login))
        .route("/social-register", post(super::auth_service::auth::social_register))
        .route("/social-callback", get(super::auth_service::auth::social_callback))
}